<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="utf-8">
	<script type="text/javascript">
		/*function useArguments() {
		  var sum = 0;
		  //循环求值
		  for(var i = 0; i < arguments.length; i++){
		      sum += arguments[i];
		  }
		console.log(sum) ;
		 }*/
useArguments(1, 2, 3, 4) 

function useArguments() {
    var arr=Array.prototype.slice.call(arguments)//把arguments类数组转化为数组
    return eval(arr.join("+"));//求和
    console.log(eval(arr.join("+")))
}
	</script>
</head>
<body>

</body>
</html>